<nav class="navbar is-fixed-top" role="navigation" aria-label="main navigation" >
	<div class="navbar-brand">
		<a class="navbar-item" href="https://bulma.io">
			<img src="https://bulma.io/images/bulma-logo.png" width="112" height="28">
		</a>

		<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
			<span aria-hidden="true"></span>
			<span aria-hidden="true"></span>
			<span aria-hidden="true"></span>
		</a>
	</div>

	<div id="navbarBasicExample" class="navbar-menu">
		<div class="navbar-start">
			<a class="navbar-item navbar-active" href="index.html">
				HTML
			</a>
			<a class="navbar-item" href="bulma_ydc.html">
				BULMAN
			</a>
			<a class="navbar-item" href="icon_ydc.html">
				图标
			</a>
			<a class="navbar-item" href="100day.html">
				100dayCSS
			</a>
			<a class="navbar-item" href="noChild.html">
				不能放在子页面代码
			</a>
			
		</div>

		<div class="navbar-end">
			<div class="navbar-item">
				<div class="buttons">
					<a class="button is-primary">
						<strong>注册</strong>
					</a>
					<a class="button is-light">
						登录
					</a>
				</div>
			</div>
		</div>
	</div>
	
</nav>

<script src="public/ydc_data.js" type="text/javascript"></script>
<script type="text/javascript">
	var navbarItem = $('#navbarBasicExample .navbar-start .navbar-item')
	var url = location.href;
	var navName_url = url.split('/')[url.split('/').length - 1].split('.')[0]; //获取跳转路径名称
	if (navName_url == 'index' || navName_url == '') {
		navbarItem.removeClass('navbar-active').eq(0).addClass('navbar-active');
	} else if (navName_url == 'bulma_ydc') {
		navbarItem.removeClass('navbar-active').eq(1).addClass('navbar-active');
	} else if(navName_url == 'icon_ydc'){
		navbarItem.removeClass('navbar-active').eq(2).addClass('navbar-active');
	} else if(navName_url == '100day'){
		navbarItem.removeClass('navbar-active').eq(3).addClass('navbar-active');
	} else{
		navbarItem.removeClass('navbar-active').eq(4).addClass('navbar-active');
	}
	// console.log(navbarItem,navName_url);
	// navbarItem.click(function(res){
	// 	console.log(res);
	// });
	
	// 此处注意：移动状态导航栏图标未显示：
	// .navbar-burger{
	// 	margin-left: 0;
	// }
	$(document).ready(function() {
	  $(".navbar-burger").click(function() {
		//切换导航显示隐藏
		  $(".navbar-burger").toggleClass("is-active");
		  $(".navbar-menu").toggleClass("is-active");
		  
	  });
	});
</script>

